#ifndef SG_BLOCKCIPHER_HPP_INCLUDED
#define SG_BLOCKCIPHER_HPP_INCLUDED

#include <ostream>

class blockcipher
{
public:
	virtual ~blockcipher() {}
	virtual int block_bytes() const = 0;
	virtual int key_bytes() const = 0;
	virtual void keysetup(const unsigned char key[]) = 0;
	virtual void encrypt(const unsigned char in[], unsigned char out[]) const = 0;
	virtual void decrypt(const unsigned char in[], unsigned char out[]) const = 0;
	virtual void identify(std::ostream& out) const = 0;

	void encrypt(unsigned char io[]) {encrypt(io,io);}
	void decrypt(unsigned char io[]) {decrypt(io,io);}
};

#endif
